

var showIndexLogo=function(){
	var url = 'organization!findCompany.action?companyNo='+companyNo;
	$.post(url,function(res){
	    var src = 'assets/img/logo2.png';
		if($(res.logo)!=''){
		    src = "logo.jsp?picName=" + res.logo;
		}
		$('#index_logo').attr('src',src);
		var name=res.orgName?res.orgName:'企业一体化解决方案';
		//if(name.length>5)name=name.substr(0,5);
		$("#header-title").html('<img src="'+src+'" width="25px"/> '+name);
	});	
};
var countKnowledge=function(){
	$.post('knowledgeInfo!countKnowledge.action',function(data){
		//$("#share_kw").text(data.shareCount);
		$("#share_my").text(data.myCount);
		$("#share_myapp").text(data.myapCount);
		//$("#share_allapp").text(data.allapCount);
		//$("#share_myappf").text(data.myapfCount);
		//$("#share_allappf").text(data.allapfCount);
	});
};
var requestStat=function(){
	var url = 'request!countRequest.action';
	$.post(url,'requestQueryDTO.loginName='+userName+'&requestQueryDTO.currentUser='+userName,function(res){
		//$("#allRequest").text(res.countAllRquest);
		
		$("#myProposedRequest").text(res.countMyRquest);
		//$("#myGroupProposedRequest").text(res.countMyGroupProposedRequest);
		
		$("#assigneeToMyRequest").text(res.countMyPeRquest);
		//$("#assigneeGroupRequest").text(res.countMyGrRquest);
		
		$/*("#myOwnerRequest").text(res.countMyOwRquest);

		$("#MYNOHANDLEREQUEST").text(res.countMyNoHandleRequest);
		$("#MYINGHANDLEREQUEST").text(res.countMyIngHandleRequest);
		$("#MYCOMPLETEREQUEST").text(res.countMyCompleteHandleRequest);
		$("#MYCLOSEREQUEST").text(res.countMyCloseHandleRequest);
		$("#myNotComprehensiveNotSubmitted").text(res.myNotComprehensiveNotSubmittedRequest);
		$("#actingToMyRequest").text(res.countactingToMyRequest);*/
	});
	
}
var init=function(){
	showIndexLogo();
	requestStat();
	countKnowledge();
}
$(document).ready(init);